<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>libBigWig: BigWigIO.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libBigWig
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">BigWigIO.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="BigWigIO_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef NOCURL</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;curl/curl.h&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">int</span> CURLcode;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">void</span> CURL;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define CURLE_OK 0</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#define CURLE_FAILED_INIT 1</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="BigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925">GLOBAL_DEFAULTBUFFERSIZE</a>;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">   22</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a> {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    BWG_FILE = 0,</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    BWG_HTTP = 1,</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    BWG_HTTPS = 2,</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    BWG_FTP = 3</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;};</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structURL__t.html">   32</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">union </span>{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifndef NOCURL</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5">   35</a></span>&#160;        CURL *<a class="code" href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5">curl</a>; </div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structURL__t.html#ad580083f95d86b68829b520d0b453b08">   37</a></span>&#160;        FILE *<a class="code" href="structURL__t.html#ad580083f95d86b68829b520d0b453b08">fp</a>; </div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    } x; </div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf">   39</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf">memBuf</a>; </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2">   40</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2">filePos</a>; </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc">   41</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc">bufPos</a>; </div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc">   42</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc">bufSize</a>; </div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f">   43</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f">bufLen</a>; </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497">   44</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a> type; </div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6">   45</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6">isCompressed</a>; </div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb">   46</a></span>&#160;    <span class="keywordtype">char</span> *<a class="code" href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb">fname</a>; </div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;} <a class="code" href="structURL__t.html">URL_t</a>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="BigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26">urlRead</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL, <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> bufSize);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;CURLcode <a class="code" href="BigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8">urlSeek</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL, <span class="keywordtype">size_t</span> pos);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<a class="code" href="structURL__t.html">URL_t</a> *<a class="code" href="BigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87">urlOpen</a>(<span class="keywordtype">char</span> *fname, CURLcode (*callBack)(CURL*), <span class="keyword">const</span> <span class="keywordtype">char</span>* mode);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keywordtype">void</span> <a class="code" href="BigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470">urlClose</a>(<a class="code" href="structURL__t.html">URL_t</a> *URL);</div><div class="ttc" id="structURL__t_html"><div class="ttname"><a href="structURL__t.html">URL_t</a></div><div class="ttdoc">This structure holds the file pointers and buffers needed for raw access to local and remote files...</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:32</div></div>
<div class="ttc" id="BigWigIO_8h_html_a53551ff2ef7a2c1b938e94ef9592ab66"><div class="ttname"><a href="BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66">bigWigFile_type_enum</a></div><div class="ttdeci">bigWigFile_type_enum</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:22</div></div>
<div class="ttc" id="BigWigIO_8h_html_add8705cdab8e6f2193a50bf095f08470"><div class="ttname"><a href="BigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470">urlClose</a></div><div class="ttdeci">void urlClose(URL_t *URL)</div><div class="ttdoc">Close a local/remote file. </div><div class="ttdef"><b>Definition:</b> io.c:275</div></div>
<div class="ttc" id="BigWigIO_8h_html_a8f6a5aa097c9af9925171dd43d688f26"><div class="ttname"><a href="BigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26">urlRead</a></div><div class="ttdeci">size_t urlRead(URL_t *URL, void *buf, size_t bufSize)</div><div class="ttdoc">Reads data into the given buffer. </div><div class="ttdef"><b>Definition:</b> io.c:89</div></div>
<div class="ttc" id="structURL__t_html_ad580083f95d86b68829b520d0b453b08"><div class="ttname"><a href="structURL__t.html#ad580083f95d86b68829b520d0b453b08">URL_t::fp</a></div><div class="ttdeci">FILE * fp</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:37</div></div>
<div class="ttc" id="structURL__t_html_ad560759e3af5e982fd369a27ba5b1dbc"><div class="ttname"><a href="structURL__t.html#ad560759e3af5e982fd369a27ba5b1dbc">URL_t::bufPos</a></div><div class="ttdeci">size_t bufPos</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:41</div></div>
<div class="ttc" id="BigWigIO_8h_html_a2f4038b5ef0a0e7dc45a20fc0bb83925"><div class="ttname"><a href="BigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925">GLOBAL_DEFAULTBUFFERSIZE</a></div><div class="ttdeci">size_t GLOBAL_DEFAULTBUFFERSIZE</div><div class="ttdef"><b>Definition:</b> io.c:12</div></div>
<div class="ttc" id="structURL__t_html_a4f68a10b5d2284fd756562ea7bd02abc"><div class="ttname"><a href="structURL__t.html#a4f68a10b5d2284fd756562ea7bd02abc">URL_t::bufSize</a></div><div class="ttdeci">size_t bufSize</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:42</div></div>
<div class="ttc" id="structURL__t_html_a98edd5e13308f6fa6f4880c87430bca2"><div class="ttname"><a href="structURL__t.html#a98edd5e13308f6fa6f4880c87430bca2">URL_t::filePos</a></div><div class="ttdeci">size_t filePos</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:40</div></div>
<div class="ttc" id="structURL__t_html_a2d3601123cd3d99cc184461007572b9f"><div class="ttname"><a href="structURL__t.html#a2d3601123cd3d99cc184461007572b9f">URL_t::bufLen</a></div><div class="ttdeci">size_t bufLen</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:43</div></div>
<div class="ttc" id="BigWigIO_8h_html_a8583139627ed0a732e6d9b4f80231c87"><div class="ttname"><a href="BigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87">urlOpen</a></div><div class="ttdeci">URL_t * urlOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)</div><div class="ttdoc">Open a local or remote file. </div><div class="ttdef"><b>Definition:</b> io.c:159</div></div>
<div class="ttc" id="structURL__t_html_a45fcd4a597a7dba67938d5aab253aebb"><div class="ttname"><a href="structURL__t.html#a45fcd4a597a7dba67938d5aab253aebb">URL_t::fname</a></div><div class="ttdeci">char * fname</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:46</div></div>
<div class="ttc" id="BigWigIO_8h_html_a55a1fcb43f68a2b3c3a2b66a6459a0a8"><div class="ttname"><a href="BigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8">urlSeek</a></div><div class="ttdeci">CURLcode urlSeek(URL_t *URL, size_t pos)</div><div class="ttdoc">Seeks to a given position in a local or remote file. </div><div class="ttdef"><b>Definition:</b> io.c:120</div></div>
<div class="ttc" id="structURL__t_html_ad1d920711f91f388ce7115341b3907cf"><div class="ttname"><a href="structURL__t.html#ad1d920711f91f388ce7115341b3907cf">URL_t::memBuf</a></div><div class="ttdeci">void * memBuf</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:39</div></div>
<div class="ttc" id="structURL__t_html_a01844303c9bf15b823504dbdf8eecdc5"><div class="ttname"><a href="structURL__t.html#a01844303c9bf15b823504dbdf8eecdc5">URL_t::curl</a></div><div class="ttdeci">CURL * curl</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:35</div></div>
<div class="ttc" id="structURL__t_html_ab1fe842d66e490e6851ec2fe4e5276e6"><div class="ttname"><a href="structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6">URL_t::isCompressed</a></div><div class="ttdeci">int isCompressed</div><div class="ttdef"><b>Definition:</b> BigWigIO.h:45</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jul 15 2017 14:46:21 for libBigWig by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
